package com.example.demo.batch.demo;

import lombok.extern.slf4j.Slf4j;
import org.springframework.batch.item.ItemWriter;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * @author huangke
 * @description xxx
 * @date 2021/1/21
 */
@Slf4j
@Component
public class ConsoleWriter implements ItemWriter<String> {
    @Override
    public void write(List<? extends String> list) {
        for (String msg : list) {
            log.debug("write data: " + msg);
        }
    }
}